package com.cc.dao;

import com.cc.entity.EmployeeProfiles;
import com.cc.entity.LeaveApplication;
import com.cc.entity.Page;
import com.cc.entity.User;

public interface UserDao {
    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    public User login(String username, String password);

    /**
     * 获取用户id
     * @param userId
     * @return
     */
    public EmployeeProfiles getEmployeeById(Integer userId);
    /**
     * 更新员工信息
     * @param employeeProfiles
     * @return
     */
    public int updateEmployeeProfiles(EmployeeProfiles employeeProfiles);
    /**
     * 获取请假申请
     * @param employeeId
     * @return
     */
    public LeaveApplication getLeaveApplicationById(Integer employeeId);

    /**
     * 分页获取数据
     * @param page
     * @return
     */
    Page<EmployeeProfiles> findByPage(String name, Page<EmployeeProfiles> page);

    /**
     *获取总记录数
     * @return
     */
    int getTotal(String name);
    /**
     * 添加员工
     * @param employeeProfiles
     * @return
     */
    public int addEmployee(EmployeeProfiles employeeProfiles);
    /**
     * 删除员工
     * @param id
     * @return
     */
    int deleteEmployee(int id);
}
